package game.leon.engine.script.exec;

/**
 * User: BianP
 * Date: 12-2-5
 */
public interface OpCode {
    // 指令
    /*
    //// 开始做简单的东西
    int LOAD = 10;  // 加载到寄存器 load r1 [var] : r1 <= var
    int SAVE = 11;  // 从寄存器回写 save r1 [var] : r1 => var
    int LOADC = 12; // 加载常量
    int MOV = 13;   // move r1 r2 : r1 <= r2

    // number
    int ADD = 20;   // 相加 add r1 r2 r3 : r1 <= r2 + r3
    int MUL = 21;
    int MINUS = 22;
    int DIV = 23;

    // bit op
    int AND = 30;   // and r1 r2 r3
    int OR = 31;
    int XOR = 32;
    int NOT = 33;   // not r1 r2 : r1 <= r2
    int SHL = 34;
    int SHR = 35;

    // super
    int JMP = 40;   // jmp r1
    int CALL = 41;  // create a new frame
    int RET = 42;   // destroy last frame
    */
    
    int NOOP = 0;
    int CALL = 1;
    int RET = 2;
    int LOAD = 3;  // load r1 LH
    int LOADC = 4; // loadc r1 LH
    int SAVE = 5;  // save r1 LH
}
